
package com.google.code.sms.android.service;

import com.google.code.sms.android.util.Util;

import android.content.Context;

/**
 * @author Sindre Mehus
 * @version $Id: MusicServiceFactory.java 1682 2010-07-17 14:16:07Z sindre_mehus $
 */
public class MusicServiceFactory {

    private static final MusicService REST_MUSIC_SERVICE = new CachedMusicService(new RESTMusicService());
    private static final MusicService OFFLINE_MUSIC_SERVICE = new OfflineMusicService();

    public static MusicService getMusicService(Context context) {
        return Util.isOffline(context) ? OFFLINE_MUSIC_SERVICE : REST_MUSIC_SERVICE;
    }
}
